<template>
  <div>
    <view class="list">
      <view class="item" v-for="(item, index) in list" :key="index">
        <u-cell-item
          :arrow="false"
          hover-class="none"
          :border-bottom="false"
          class="title"
          title="商户名称："
          :value="item.merchName"
        />
        <u-cell-item
          :arrow="false"
          hover-class="none"
          :border-bottom="false"
          title="所属代理商："
          :value="item.agentName"
        />
        <!-- <u-cell-item
          :arrow="false"
          hover-class="none"
          :border-bottom="false"
          title="品牌："
          :value="item.brandName"
        /> -->
      </view>
    </view>

    <uni-load-more :status="loadMore"></uni-load-more>
  </div>
</template>

<script>
import loadMoreData from "@/mixins/loadmore";
import mockjs from "mockjs";
export default {
  mixins: [loadMoreData],
  data() {
    return {
      list: [],
    };
  },
  created() {
    this.list = this.list.concat(
      mockjs.mock({
        "list|10-15": [
          {
            merchName: "@cname",
            agentName: "@cname",
            brandName: "红色押金版",
          },
        ],
      }).list
    );
    this.getList();
  },
  methods: {
    getList() {
      //   let params = {
      //     pageNum: this.pageNum,
      //     pageSize: this.pageSize,
      //     ...this.query,
      //   };
      //   listPage(params).then((res) => {
      var list = mockjs.mock({
        "list|10": [
          {
            merchName: "@cname",
            agentName: "@cname",
            brandName: "红色押金版",
          },
        ],
      }).list;
    //   console.log(list)
      this.loadMoreStatusDeal(list);
      if (list.length > 0) {
        this.list = this.list.concat(list);
      }
      //   });
    },
    reachBottomCallBack() {
      this.getList();
    },
  },
};
</script>
<style scoped lang='scss'>
.item {
  margin: R(25) R(25);
  padding: R(14) R(28) R(24);
  background: #fff;
  border-radius: R(10);
  .title {
    font-size: R(30);
    font-weight: bold;
    color: #1a1a1a;
    /deep/.u-cell__value {
      color: #1a1a1a;
    }
  }
  /deep/.u-cell {
    padding: R(4) R(10);
    .u-cell__value {
      text-align: left;
    }
  }
}
</style>